home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / mailchek.zip / RUNOPUS.BAT < prev    next >
DOS Batch File  |  1993-01-04  |  4KB  |  153 lines

  1. rem This is the RUNOPUS.BAT I use on CompuSci. You probably don't need
  2. rem one so complex!!
  3. rem--------------------------------------------------------------------
  4.  
  5.  
  6. :START
  7. echo off
  8. cd\opus
  9. watchdg2 off
  10. rem
  11. rem Here we invoke OPUS.  We are using the '-u' command line switch
  12. rem to make OPUS unpacket any ARCmail packets it may find before it
  13. rem goes online.  This is optional -- see your documentation.
  14. rem
  15. cls
  16. opus opus -u
  17. echo off
  18. rem
  19. rem Here we check for ERRORLEVELS do do various things...
  20. rem      ENDCALLER = Where OPUS goes after a caller disconnects.
  21. rem                  This is an option in the OPUS CTL file.
  22. rem      START     = The beginning of the BATch file.
  23. rem      FIDO      = Where the outgoing mail is handled.
  24. rem      MAKELOGS  = Daily maintenance.
  25. rem      ECHOMAIL  = Where EchoMail is done.
  26. rem      QUICKTOSS = What happens after CRASHMAIL is received.
  27. rem                  Another option -- see the CTL file.
  28. rem      CLEANUP   = More daily maintenance.
  29. rem
  30. rem This is a VERY complex sample BATch file.  Your need not be anything
  31. rem like this at all.  We have just tried to show most of the possibilities
  32. rem which can be encountered.
  33. rem
  34. if errorlevel 25 goto ENDCALLER
  35. if errorlevel 20 goto FIDO
  36. if errorlevel 15 goto MAKELOGS
  37. if errorlevel 12 goto ECHOMAIL
  38. if errorlevel 10 goto CLEANUP
  39. if errorlevel  2 goto START
  40. GOTO FINIS
  41.  
  42.  
  43. rem If you asked OPUS (in the CTL file) to exit after each caller, here
  44. rem is where it would go.  Under normal circumstances this is a feature
  45. rem which doesn't have a lot of purpose unless you need to do some special
  46. rem processing after each caller.
  47. rem
  48. :ENDCALLER
  49. rem------------------------------Here is MAILCHEK Update
  50. mailchek update 6/x 7/x
  51. GOTO START
  52.  
  53.  
  54. rem Since OPUS doesn't handle outgoing mail yet, you must have some other
  55. rem mailer program do the work for you.
  56. rem Fido(tm) works fine too.
  57. rem
  58. :FIDO
  59. cd\opus\matrix
  60. fido_ibm 1/J /Y /P/ 15/F 15/S 60/L 120/D 400/K 128/V 30/W 30/A 20/G /U /2
  61. CD\opus
  62. GOTO START
  63.  
  64.  
  65. rem We go here for daily maintenance...
  66. rem
  67. :CLEANUP
  68. rem
  69. rem do whatever...
  70. renum -r 0 -r 1 -r 2 -r 3 -r 4 -r 5 -r 6 -r 7 -r 9
  71.  
  72. rem-----------------------Here is MAILCHEK Compile
  73. mailchek compile 6/x 7/x
  74.  
  75.  
  76. rem Toss all mail that has to be fixed.... EchoMail stuff
  77. ARCMAIL from 135/1
  78. TOSSMAIL run -delay
  79. TIDYMAIL OPUSNET -cronsort
  80. TIDYMAIL MIAMINET -cronsort
  81. cd\opus\matrix
  82. del c:sysop.log
  83. daynbr ren mailer.log mailer.@###
  84. daynbr \opus\arca mailer.arc mailer.@###
  85. daynbr del mailer.@###
  86. cd\opus
  87. rem 
  88. rem  If a new nodelist file NDIFF???.ARC has arrived process it and generate
  89. rem  new routing and nodelist files
  90. cd\opus\matrix
  91.  
  92. if exist c:\opus\fidofile\ndiff???.arc goto process
  93. goto start
  94. :process
  95. copy c:\opus\fidofile\ndiff???.arc
  96. del c:\opus\fidofile\ndiff???.arc
  97. xarc ndiff???.arc
  98. editnl
  99. del route.b
  100. del route.c
  101. del route.d
  102. del nodelist.bbs
  103. xlatlist
  104. routegen
  105. opusnode -f
  106. del *.fon
  107. del nodediff.*
  108. cd\opus
  109.  
  110. rem 
  111. GOTO START
  112.  
  113. rem Here is where we handle EchoMail if you choose to do your own toss
  114. rem and scan.  Remember that OPUS can do toss automatically for you if
  115. rem you choose.  See the documentation and the CTL file for examples.
  116. rem 
  117. :ECHOMAIL
  118. rem do toss, scan, arcmail, killdupes, whatever...
  119. scanmail run -delay
  120. arcmail to 135/1
  121. GOTO START
  122.  
  123.  
  124. rem If you choose it in the CTL file, OPUS will exit after it receives
  125. rem CRASHMAIL to do any processing you want.  This is also where OREMOTE
  126. rem lives if you use it (see OREMOTE documentation -- a separate utility).
  127. rem
  128. :QUICKTOSS
  129. rem do whatever...
  130. rem do OREMOTE...
  131. GOTO START
  132.  
  133. rem Just another maintenance thingy to liven up the BATch file...
  134. rem 
  135. :MAKELOGS
  136. rem how about ARCing those massive logs?
  137. rem 
  138. opususrt opus.log > useract.log
  139. daynbr ren anewuser.bbs anewuser.@###
  140. daynbr ren opus.log opus.@###
  141. daynbr ren useract.log useract.@###
  142. daynbr arca opuslog.arc opus.@###
  143. daynbr arca useract.arc useract.@###
  144. daynbr arca anewuser.arc anewuser.@###
  145. wait 500
  146. GOTO START
  147.  
  148. rem And here is where we go when you hit control-c from the keyboard...
  149. rem
  150. :FINIS
  151. cls
  152. echo CompuSci OPUS done for the Day.
  153.